package zju.ccnt.rest.domain;

import javax.persistence.Entity;

/**
 * Created by zha on 14/11/19.
 */
@Entity
public class ResourceClass extends BaseEntity {
    private String businessId;
    private String name;

    public ResourceClass(){
        super();
    }

    public ResourceClass(String name, String businessId){
        super();
        this.name = name;
        this.businessId = businessId;
    }

    public String getBusinessId() {
        return businessId;
    }

    public void setBusinessId(String businessId) {
        this.businessId = businessId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) return false;
        if (obj.getClass() != this.getClass()) return false;

        ResourceClass that = (ResourceClass)obj;
        return that.name.equals(this.name) && that.businessId.equals(this.businessId);
    }
}
